﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MacomberMapSystem.Common.Serialization;
using System.Data.Common;

namespace MacomberMapSystem.Common.Integration
{
    /// <summary>
    /// This class holds information on a substation (coordinates from our GIS provider)
    /// </summary>
    public class GIS_Substation : MM_Element
    {
        /// <summary>The unique identifier of our substation</summary>
        [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.FieldValue)]
        public UInt64 Sub_Id;

        /// <summary>The latitude of our substation</summary>
        [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.FieldValue)]
        public double Latitude;

        /// <summary>The longitude of our substation</summary>
        [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.FieldValue)]
        public double Longitude;

        /// <summary>The company associated with our substation</summary>        
        [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.FieldValue)]
        public string Company;

        /// <summary>The name of our substation</summary>
        [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.FieldValue)]
        public string Name;

        
          #region Initialization
        /// <summary>
        /// Initilize a new line
        /// </summary>
        /// <param name="dRd"></param>
        /// <param name="Repository"></param>
        public GIS_Substation(DbDataReader dRd, MM_Repository Repository)
            : base(dRd, Repository)
        {

        }

        /// <summary>
        /// Initialize an empty substation
        /// </summary>
        public GIS_Substation()
            : base(null, null)
        { }
          #endregion
    }
}
